write

abstract fun write(data: Array<Byte>)

Appends a chunk of the response data to the URL request. This method may be called multiple times to append several chunks. When all the chunks are written either the complete or fail method must be called to indicate that the request is completed or failed.

Parameters

data

the response data bytes

Throws

when the URL request is already completed or failed